DeadLinks in partition

Hello,

I have an exchange process with a customer via partition.

I have a module with outlinks to another module in the partition. Before sending the partition to the customer, I delete all objects in the source module and perform a purge of the module. Then I copy objects from module outside the partition and recreate links to the target module.

My problem is that incoming links list in the yellow arrow of the target module I have the old incoming links which have been deleted by the purge process in the source module.

I have found a solution to avoid this anymore (delete links via the linksets of the link module) but how could I purge other deadlinks ?

Your help would be much appreciated.

Best regards,
MattMar
SystemAdmin - Fri Jul 09 10:52:00 EDT 2010

Re: DeadLinks in partition
Mathias Mamsch - Fri Jul 09 15:16:55 EDT 2010

There are some ways to get "stale" links in DOORS. Sometimes when you delete outlinks DOORS cannot remove the corresponding inlinks from the target module, for example, when it is partitioned out or locked or you had it open for edit and then do not save it.

I think you can resolve this by running a script from the kitchen tools, which will remove all stale links in the module. I think this script is also available from the IBM support site.

Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: DeadLinks in partition
SystemAdmin - Mon Jul 12 06:05:23 EDT 2010

Hello Mathias,

First, thank you for your response.

Regarding the script you are talking about, I have found it in the kitchen (Remove slate links: Fixlinks.dxl). Unfortunatly it did not solve my problem. Indeed the script looks incoming link trhough Link type which does not exist anymore.

The only way I have to detect these deadlinks is through the LinkRef type but i can not delete a LinkRef.

Morover, I can not build back the deadlinks since objects are not existing anymore.

I have looked into the dxl manual but could not find a way to delete LinkRef type. Do you have one?

Thanks in advance for you support.

Best regards,
MattMar

Re: DeadLinks in partition
Mathias Mamsch - Mon Jul 12 10:37:05 EDT 2010

SystemAdmin - Mon Jul 12 06:05:23 EDT 2010
Hello Mathias,

First, thank you for your response.

Regarding the script you are talking about, I have found it in the kitchen (Remove slate links: Fixlinks.dxl). Unfortunatly it did not solve my problem. Indeed the script looks incoming link trhough Link type which does not exist anymore.

The only way I have to detect these deadlinks is through the LinkRef type but i can not delete a LinkRef.

Morover, I can not build back the deadlinks since objects are not existing anymore.

I have looked into the dxl manual but could not find a way to delete LinkRef type. Do you have one?

Thanks in advance for you support.

Best regards,
MattMar

So you cannot get a "Link" object for the link? Open one of the affected modules and execute the following code with a problematic object as the current object:
 

Link L
LinkRef lr
 
Object obj = current
 
for lr in obj<-"*" do {
    ModuleVersion modVer = sourceVersion lr
    load(modVer, true) 
}
 
for L in obj<-"*" do { 
    string s = source L
    int nr = sourceAbsNo L
    print "Source: " s " object nr: " nr "\n"
}

 


If you get no printout from the stale links you might be screwed. But my hope is you would.

Regards, Mathias

 

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

 

Re: DeadLinks in partition
llandale - Mon Jul 12 11:17:15 EDT 2010

SystemAdmin - Mon Jul 12 06:05:23 EDT 2010
Hello Mathias,

First, thank you for your response.

Regarding the script you are talking about, I have found it in the kitchen (Remove slate links: Fixlinks.dxl). Unfortunatly it did not solve my problem. Indeed the script looks incoming link trhough Link type which does not exist anymore.

The only way I have to detect these deadlinks is through the LinkRef type but i can not delete a LinkRef.

Morover, I can not build back the deadlinks since objects are not existing anymore.

I have looked into the dxl manual but could not find a way to delete LinkRef type. Do you have one?

Thanks in advance for you support.

Best regards,
MattMar

If you truly cannot delete these corrupted links, then I'd be tempted to do this:
For a particular link-set containing such links...
... create a temporary link module
... find all the non-corrupt links, and create a new corresponding link in the temp link module.
... open both modules Edit, then delete the offending link-set.
... save
... re-create the formerly offending link-set.
... for each link in the temp link-set, recreate that link in the newly created link-set.
... delete the temp link module and therefore the linkset.
... save all.

  • Louie

Re: DeadLinks in partition
Mathias Mamsch - Mon Jul 12 11:32:07 EDT 2010

llandale - Mon Jul 12 11:17:15 EDT 2010
If you truly cannot delete these corrupted links, then I'd be tempted to do this:
For a particular link-set containing such links...
... create a temporary link module
... find all the non-corrupt links, and create a new corresponding link in the temp link module.
... open both modules Edit, then delete the offending link-set.
... save
... re-create the formerly offending link-set.
... for each link in the temp link-set, recreate that link in the newly created link-set.
... delete the temp link module and therefore the linkset.
... save all.

  • Louie

The problem is he might not even have a linkset for those links. This error occurs when the "inlinks.dtc" file from the module goes out of sync with the "treedata.dtc" files from the modules that link to you.

The solution would be to replace the "inlinks.dtc" by an empty version, but this only works a) if there are no inlinks to keep b) this must be done on database level and does not suit for a permanent process.

It sounds like a bug for sure, so probably the best way to deal with it is to try to reproduce the error, post it as a bug, try to find a workaround and wait till it gets fixed.

Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: DeadLinks in partition
llandale - Mon Jul 12 15:03:58 EDT 2010

Mathias Mamsch - Mon Jul 12 11:32:07 EDT 2010
The problem is he might not even have a linkset for those links. This error occurs when the "inlinks.dtc" file from the module goes out of sync with the "treedata.dtc" files from the modules that link to you.

The solution would be to replace the "inlinks.dtc" by an empty version, but this only works a) if there are no inlinks to keep b) this must be done on database level and does not suit for a permanent process.

It sounds like a bug for sure, so probably the best way to deal with it is to try to reproduce the error, post it as a bug, try to find a workaround and wait till it gets fixed.

Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

I do not advocate playing with the database files, but if someone insisted on doing it that way, I would offer the following suggestion. Gather the list of all valid links, deleting all the links. Save and close the modules and exit DOORS. Tweak the database files. Re-open the module. Re-create the links.

  • Louie

Re: DeadLinks in partition
Mathias Mamsch - Mon Jul 12 16:29:51 EDT 2010

llandale - Mon Jul 12 15:03:58 EDT 2010
I do not advocate playing with the database files, but if someone insisted on doing it that way, I would offer the following suggestion. Gather the list of all valid links, deleting all the links. Save and close the modules and exit DOORS. Tweak the database files. Re-open the module. Re-create the links.

  • Louie

I agree ... Playing around with the database files might not be a good choice anyway. The files have quite a size normally, without a suitable editor, removing encryption, making the changes and reencrypting the files is messy and unsafe. Not the choice for a production environment. So lets hope that he has luck with removing the links by DXL or by deleting a linkset.

Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: DeadLinks in partition
SystemAdmin - Tue Jul 13 07:01:22 EDT 2010

Dear all,

First thank you for your response and support.

Regarding your script Mathias: I have executed it and it does not print anything for the stale links :-( Indeed since the source object does not exist anymore at all.

Concernning the database manipulation: I will not touch it at all...

Regarding the linkset process, I have tried to delete the linksets and it did not delete the stale link. By the way this solution will be applied in my further processes since it seems to not add stale links.

As a conclusion for now, I guess I am screwed to have these deadlinks until the support provides a solution/bug fix if it is a bug.

Best regards,
MattMar

Re: DeadLinks in partition
Mathias Mamsch - Tue Jul 13 07:40:31 EDT 2010

SystemAdmin - Tue Jul 13 07:01:22 EDT 2010
Dear all,

First thank you for your response and support.

Regarding your script Mathias: I have executed it and it does not print anything for the stale links :-( Indeed since the source object does not exist anymore at all.

Concernning the database manipulation: I will not touch it at all...

Regarding the linkset process, I have tried to delete the linksets and it did not delete the stale link. By the way this solution will be applied in my further processes since it seems to not add stale links.

As a conclusion for now, I guess I am screwed to have these deadlinks until the support provides a solution/bug fix if it is a bug.

Best regards,
MattMar

You can try this code with one of the affected objects as current. I forgot to use the "all" keyword. Maybe you get a printout there?

Regards, Mathias
 

Link L
LinkRef lr
 
Object obj = current
 
for lr in all (obj<-"*") do {
    ModuleVersion modVer = sourceVersion lr
    load(modVer, true) 
    string s = source lr
    int nr = sourceAbsNo lr
    print "Ref Source: " s " object nr: " nr "\n"
 
}
 
for L in all (obj<-"*") do { 
    string s = source L
    int nr = sourceAbsNo L
    print "Source: " s " object nr: " nr "\n"
}

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

 

Re: DeadLinks in partition
Mathias Mamsch - Tue Jul 13 07:43:29 EDT 2010

Mathias Mamsch - Tue Jul 13 07:40:31 EDT 2010

You can try this code with one of the affected objects as current. I forgot to use the "all" keyword. Maybe you get a printout there?

Regards, Mathias
 

Link L
LinkRef lr
 
Object obj = current
 
for lr in all (obj<-"*") do {
    ModuleVersion modVer = sourceVersion lr
    load(modVer, true) 
    string s = source lr
    int nr = sourceAbsNo lr
    print "Ref Source: " s " object nr: " nr "\n"
 
}
 
for L in all (obj<-"*") do { 
    string s = source L
    int nr = sourceAbsNo L
    print "Source: " s " object nr: " nr "\n"
}

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

 

What you can also try is to baseline the module or to copy/paste or archive/restore the module to a different position. Maybe this helps with the links. In all cases DOORS will process the in-links, which might get rid of the links. Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: DeadLinks in partition
SystemAdmin - Tue Jul 13 08:05:42 EDT 2010

Mathias Mamsch - Tue Jul 13 07:40:31 EDT 2010

You can try this code with one of the affected objects as current. I forgot to use the "all" keyword. Maybe you get a printout there?

Regards, Mathias
 

Link L
LinkRef lr
 
Object obj = current
 
for lr in all (obj<-"*") do {
    ModuleVersion modVer = sourceVersion lr
    load(modVer, true) 
    string s = source lr
    int nr = sourceAbsNo lr
    print "Ref Source: " s " object nr: " nr "\n"
 
}
 
for L in all (obj<-"*") do { 
    string s = source L
    int nr = sourceAbsNo L
    print "Source: " s " object nr: " nr "\n"
}

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

 

Hello Mathias,

I have tested your new script and stale links information are printed in the first print "Ref source" message but not in the second one.

Regarding the solution to move the module, I can not manage to do this since I am the away partition and this module is in read only for me.

As mentioned in a previous post, the links references exist but not the links.

Best regards,
MattMar

Re: DeadLinks in partition
Mathias Mamsch - Tue Jul 13 08:17:15 EDT 2010

SystemAdmin - Tue Jul 13 07:01:22 EDT 2010
Dear all,

First thank you for your response and support.

Regarding your script Mathias: I have executed it and it does not print anything for the stale links :-( Indeed since the source object does not exist anymore at all.

Concernning the database manipulation: I will not touch it at all...

Regarding the linkset process, I have tried to delete the linksets and it did not delete the stale link. By the way this solution will be applied in my further processes since it seems to not add stale links.

As a conclusion for now, I guess I am screwed to have these deadlinks until the support provides a solution/bug fix if it is a bug.

Best regards,
MattMar

Ok, i reproduced the error in my local database. The DXL script printed nothing. Copying the module got rid of the stale links, also deleting the link module worked. Both things might not be solutions for you, when you have baselines in the module that contain links and you want to still use this module.

On database level I could just delete the "inlinks.dtc" file from the current version of the module. Draw one link to the module, save it - and DOORS recreated the file, stale links gone.

I guess that is as far as I can help. Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: DeadLinks in partition
Mathias Mamsch - Tue Jul 13 08:25:42 EDT 2010

SystemAdmin - Tue Jul 13 08:05:42 EDT 2010
Hello Mathias,

I have tested your new script and stale links information are printed in the first print "Ref source" message but not in the second one.

Regarding the solution to move the module, I can not manage to do this since I am the away partition and this module is in read only for me.

As mentioned in a previous post, the links references exist but not the links.

Best regards,
MattMar

Uhm ... Now that you mention that you are in the away partition and this module is part of it. Can anyone say if this is wanted behavior? It makes a little sense, that you see there are inlinks on the module in the home database, even though the module where the links come from has not been exported.

Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: DeadLinks in partition
SystemAdmin - Tue Jul 13 08:47:08 EDT 2010

Mathias Mamsch - Tue Jul 13 08:25:42 EDT 2010
Uhm ... Now that you mention that you are in the away partition and this module is part of it. Can anyone say if this is wanted behavior? It makes a little sense, that you see there are inlinks on the module in the home database, even though the module where the links come from has not been exported.

Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Thanks for the support.

Regarding my database structure, both source and target modules are in the partition and I work on the away partition. I can read/write in the source module and link module and only the target module is in read only.

May be I shall return the partition to the customer and ask him to perform a purge of the link module then export the database to me in order to build back links from source to target.

In this case we should be able to definitly destroy stale links and then apply the delete linkset process to avoid new stale links.

Though, I am quite feared to manipulate database's files directly especially if I am in the away partition. Dunno what will the DOORS behaviour once the partition returned (file reference...)

Best regards,
MattMatr

Re: DeadLinks in partition
SystemAdmin - Fri Aug 20 05:34:55 EDT 2010

SystemAdmin - Tue Jul 13 08:47:08 EDT 2010
Thanks for the support.

Regarding my database structure, both source and target modules are in the partition and I work on the away partition. I can read/write in the source module and link module and only the target module is in read only.

May be I shall return the partition to the customer and ask him to perform a purge of the link module then export the database to me in order to build back links from source to target.

In this case we should be able to definitly destroy stale links and then apply the delete linkset process to avoid new stale links.

Though, I am quite feared to manipulate database's files directly especially if I am in the away partition. Dunno what will the DOORS behaviour once the partition returned (file reference...)

Best regards,
MattMatr

Dear all,

First I would like to thank you all for your support on this topic and appologize for the late answer (holidays + IBM Service Request support).

Second I post here to inform you that IBM provided workarround to solve this deadlinks issue I would like to share with you.

The solution is the following:
1) Open target module in read-only
2) Perform an analysis wizard for all incoming links
3) Browse all the objects having incoming links one by one (important step not provided by IBM)
4) Open source module in exclusive edit
5) Create a link from source module to target module
6) Save source module

Applying this procedure resolved the problem.

Many tahnks again.
MattMar